#ifndef AEYECLIENTS_AEYESDKSTRUCTURESDEV_H
#define AEYECLIENTS_AEYESDKSTRUCTURESDEV_H

#include <cstdint>
#include <cstddef>
#include <tuple>

#include "AEyeSDKStructures.hpp"

namespace aeye {

static constexpr size_t MAX_NUMBER_OF_SCAN_ZONES = 5;

enum class RangeCode : uint8_t {
  BUFFER_100_M = 0,
  BUFFER_22_M = 1,
  BUFFER_50_M = 2,
  BUFFER_300_M = 3,
  BUFFER_150_M = 4,
  BUFFER_200_M = 5,
  BUFFER_250_M = 6,
  BUFFER_400_M = 7,
  BUFFER_500_M = 8,
  BUFFER_750_M = 9,
  BUFFER_1000_M = 10,
};

typedef struct {
  uint16_t top_row;
  uint16_t bottom_row;
  uint8_t row_spacing;
  uint8_t col_spacing;
  RangeCode range_code;
} ATTRIBUTE_PACKED AdvancedZoneScanRegion;

struct HsyncParameters {
    float avgTemp;
    float instTemp;
    bool np0Capacitor;
};

inline bool operator==(const AdvancedZoneScanRegion &lhs, const AdvancedZoneScanRegion &rhs) noexcept {
  return std::tie(lhs.top_row, lhs.bottom_row, lhs.row_spacing, lhs.col_spacing, lhs.range_code) ==
         std::tie(rhs.top_row, rhs.bottom_row, rhs.row_spacing, rhs.col_spacing, rhs.range_code);
}

inline bool operator!=(const AdvancedZoneScanRegion &lhs, const AdvancedZoneScanRegion &rhs) noexcept {
  return !(lhs == rhs);
}

}
#endif //AEYECLIENTS_AEYESDKSTRUCTURESDEV_H
